package routers

import (
	"ginvueadmin/controllers"
	"ginvueadmin/global"
	"ginvueadmin/middleware"

	"github.com/gin-gonic/gin"
)

func Routers() *gin.Engine {
	var Router = gin.Default()

	Router.Use(middleware.Cors())
	global.LOG.Info("use middleware cors")

	apiGroup := Router.Group("")
	Router.GET("/", controllers.Index)

	BaseRouter(apiGroup)
	MenuRouter(apiGroup)

	return Router
}
